const router = require('koa-router')()
const {handleReq}=require('../controllers/test')

router.prefix('/test')

router.get('/', function (ctx, next) {
  ctx.body = 'this is a test response!'
})

router.get('/xhr/get', handleReq)

router.get('/bar', function (ctx, next) {
  ctx.body = 'this is a users/bar response'
})
router.get('/bar', function (ctx, next) {
  ctx.body = 'this is a users/bar response'
})
router.post('/setResopnse', function (ctx, next) {
  ctx.set('Content-Type', 'application/zip')
  ctx.set('Edtg', '1234')
  ctx.body = 'this is a users/bar response'
})

module.exports = router
